package com.example.interfaces.dto;

import java.math.BigDecimal;
import com.example.infrastructure.excel.ExcelExportable;
import com.example.infrastructure.excel.ExcelImportable;
import cn.idev.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import jakarta.validation.constraints.*;

/**
 * 处方表 DTO
 *
 * @author wangal
 * @since 2025-07-25
 */
@Data
@Schema(name = "PrescriptionsDTO", description = "处方表DTO")
public class PrescriptionsDTO implements ExcelExportable, ExcelImportable {

    @Schema(description = "处方单号")
    @ExcelProperty("处方单号")
    @NotBlank(message = "处方单号不能为空")
    private String prescriptionNo;
    
    @Schema(description = "问诊ID")
    @ExcelProperty("问诊ID")
    @NotNull(message = "问诊ID不能为空")
    private Long consultationId;
    
    @Schema(description = "用户ID")
    @ExcelProperty("用户ID")
    @NotNull(message = "用户ID不能为空")
    private Long userId;
    
    @Schema(description = "医生ID")
    @ExcelProperty("医生ID")
    @NotNull(message = "医生ID不能为空")
    private Long doctorId;
    
    @Schema(description = "患者姓名")
    @ExcelProperty("患者姓名")
    @NotBlank(message = "患者姓名不能为空")
    private String patientName;
    
    @Schema(description = "患者年龄")
    @ExcelProperty("患者年龄")
    @NotNull(message = "患者年龄不能为空")
    private Integer patientAge;
    
    @Schema(description = "患者性别：0未知，1男，2女")
    @ExcelProperty("患者性别：0未知，1男，2女")
    private Byte patientGender;
    
    @Schema(description = "诊断结果")
    @ExcelProperty("诊断结果")
    @NotBlank(message = "诊断结果不能为空")
    private String diagnosis;
    
    @Schema(description = "医嘱建议")
    @ExcelProperty("医嘱建议")
    @NotBlank(message = "医嘱建议不能为空")
    private String advice;
    
    @Schema(description = "处方总金额")
    @ExcelProperty("处方总金额")
    private BigDecimal totalAmount;
    
    @Schema(description = "状态：0待支付，1待配送，2配送中，3已完成，4已取消")
    @ExcelProperty("状态：0待支付，1待配送，2配送中，3已完成，4已取消")
    private Byte status;
    
    @Schema(description = "租户编号")
    @ExcelProperty("租户编号")
    @NotNull(message = "租户编号不能为空")
    private Long tenantId;
    
}
